Crate ehttp

source ·
Expand description

Minimal HTTP client for both native and WASM.

Example:

let request = ehttp::Request::get("https://www.example.com");
ehttp::fetch(request, move |result: ehttp::Result<ehttp::Response>| {
    println!("Status code: {:?}", result.unwrap().status);
});

The given callback is called when the request is completed. You can communicate the results back to the main thread using something like:

Feature flags

  • native-async — Support fetch_async on native

  • streaming — Support streaming fetch

Modules

  • Streaming HTTP client for both native and WASM.

Structs

Functions

Type Aliases

  • A description of an error.
  • A type-alias for Result<T, ehttp::Error>.